<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">











<html xmlns="http://www.w3.org/1999/xhtml">
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
    <title>NPanday - Building NPanday</title>
    <style type="text/css" media="all">
      @import url("../css/maven-base.css");
      @import url("../css/maven-theme.css");
      @import url("../css/site.css");
    </style>
    <link rel="stylesheet" href="../css/print.css" type="text/css" media="print" />
          </head>
  <body class="composite">
    <div id="banner">
                  <a href="" id="bannerLeft">
    
                                            <img src=".././images/NPanday.png" alt="" />
    
            </a>
                        <a href="http://www.codeplex.com/" id="bannerRight">
    
                                            <img src=".././images/logo-home.png" alt="" />
    
            </a>
            <div class="clear">
        <hr/>
      </div>
    </div>
    <div id="breadcrumbs">
          
  

  
    
            
  
    
            <div class="xleft">
          
                <a href="http://npanday.codeplex.com/" class="externalLink">NPanday Home</a>
                &gt;
      
                <a href="../">NPanday 1.2</a>
                  </div>
            <div class="xright">      
  

  
    
            
  
    
             Last Published: 22 Jun 2010
              &nbsp;| Version: 1.2
            </div>
      <div class="clear">
        <hr/>
      </div>
    </div>
    <div id="leftColumn">
      <div id="navcolumn">
           
  

  
    
            
  
    
                   <h5>General Info</h5>
            <ul>
              
    <li class="none">
                    <a href="../index.html">NPanday Overview</a>
          </li>
              
    <li class="none">
                    <a href="../release-notes.html">NPanday Release Notes</a>
          </li>
              
    <li class="none">
                    <a href="../faqs.html">NPanday FAQs</a>
          </li>
              
    <li class="none">
                    <a href="../faqs.html">NPanday Features</a>
          </li>
              
    <li class="none">
                    <a href="../npanday.pdf">Documentation PDF</a>
          </li>
          </ul>
              <h5>User's Guide</h5>
            <ul>
              
    <li class="none">
                    <a href=".././guide/index.html">Introduction</a>
          </li>
              
    <li class="none">
                    <a href=".././guide/installation/index.html">Installation</a>
          </li>
              
    <li class="none">
                    <a href=".././guide/vs/index.html">Visual Studio Add-in</a>
          </li>
              
    <li class="none">
                    <a href=".././guide/maven/index.html">Maven Command Line</a>
          </li>
              
    <li class="none">
                    <a href=".././guide/devinfra/index.html">Maven Development Infrastructure</a>
          </li>
              
    <li class="none">
                    <a href="../plugins/index.html">NPanday Plugins</a>
          </li>
          </ul>
              <h5>Contributing</h5>
            <ul>
              
    <li class="none">
                    <a href=".././developers/index.html">Developer's Guide</a>
          </li>
              
    <li class="none">
                    <a href=".././issue-tracking.html">Issue Tracking</a>
          </li>
              
    <li class="none">
                    <a href=".././mail-lists.html">Mailing Lists</a>
          </li>
          </ul>
              <h5>Project Documentation</h5>
            <ul>
              
                
              
      
            
      
            
      
            
      
            
      
            
      
            
      
              
        <li class="collapsed">
                    <a href="../project-info.html">Project Information</a>
                </li>
          </ul>
              <h5>Resources</h5>
            <ul>
              
    <li class="none">
                    <a href="http://maven.apache.org/" class="externalLink">Apache Maven</a>
          </li>
              
    <li class="none">
                    <a href="http://npanday.codeplex.com/" class="externalLink">NPanday on CodePlex</a>
          </li>
          </ul>
                                           <a href="http://maven.apache.org/" title="Built by Maven" class="poweredBy">
            <img alt="Built by Maven" src="../images/logos/maven-feather.png"></img>
          </a>
                       
  

  
    
            
  
    
        </div>
    </div>
    <div id="bodyColumn">
      <div id="contentBox">
        <div class="section"><h2>Building NPanday</h2>
<p>Building NPanday is quite simple and follows the typical convention for a Maven project.</p>
<div class="section"><h3>Pre-requisites</h3>
<p>You must first have any pre-requisites installed:</p>
<ul><li>Visual Studio 2005 or above</li>
<li>.NET 2.0 runtime, or above</li>
<li>.NET 2.0 SDK, or above</li>
<li>NUnit 2.2.8 or above</li>
<li>Apache Maven 2.0.9 or above</li>
</ul>
<p>See the <a href="../guide/installation/index.html"> Installation Guide</a>, and particularly the information on how to <a href="../guide/installation/index.html#Set_the_PATH"> Set the PATH</a> for more information. The easiest way to do this is to run the <i>Visual Studio 2005 Command Prompt</i> from the Windows Start menu.</p>
<p>NUnit in particular must be installed and in the PATH. In some versions, you may need to include the <tt>bin\net-2.0</tt> directory instead of just the <tt>bin</tt> directory in your PATH to get the correct test runner version.</p>
</div>
<div class="section"><h3>Checking out the Source Code</h3>
<p>You can check out the latest source code from <a class="externalLink" href="https://npanday.svn.codeplex.com/svn/trunk">https://npanday.svn.codeplex.com/svn/trunk</a>. You can also download a previous version as an archive from the web site, or from check it out from the subdirectory of <a class="externalLink" href="https://npanday.svn.codeplex.com/svn/tags">https://npanday.svn.codeplex.com/svn/tags</a>.</p>
<p>For example:</p>
<div class="source"><pre>svn co https://npanday.svn.codeplex.com/svn/trunk npanday</pre>
</div>
</div>
<div class="section"><h3>Enabling additional Remote Repositories</h3>
<p>NPanday has some dependencies that are not in Maven Central. In order to have them downloaded to your local repository you have to uncomment some additional repositories in the <tt>repositories</tt> section of NPanday's <tt>pom.xml</tt>, or you can add the following remote repositories to your local <tt>settings.xml</tt>.</p>
<div class="source"><pre>&lt;repository&gt;
  &lt;id&gt;npanday.3rdparty&lt;/id&gt;
  &lt;name&gt;NPanday 3rd-Party Repository&lt;/name&gt;
  &lt;url&gt;http://repo.npanday.org/archiva/repository/3rdparty&lt;/url&gt;
  &lt;snapshots&gt;
        &lt;enabled&gt;false&lt;/enabled&gt;
  &lt;/snapshots&gt;
&lt;/repository&gt;
&lt;repository&gt; 
  &lt;id&gt;aduna.org&lt;/id&gt;  
  &lt;url&gt;http://repository.aduna-software.org/maven2&lt;/url&gt; 
&lt;/repository&gt;</pre>
</div>
<p>For performance reasons you should disable them again after the first successful build.</p>
</div>
<div class="section"><h3>Building All with Maven</h3>
<p>Everything in the distribution, including the Visual Studio add-in, is built using the following command:</p>
<div class="source"><pre>mvn clean install</pre>
</div>
<p><i>Note:</i> On Windows Vista and Windows 7, this presently needs to be run as an administrator to build successfully, as it installs 3 libraries into the GAC.</p>
<p>Once this command has completed, you can proceed to use the Maven plugins immediately. To install the Visual Studio Add-in, you will need to still run the <tt>mvn npanday.plugin:maven-vsinstaller-plugin:install</tt> command as described in the <a href="../guide/installation/index.html"> Installation Guide</a>.</p>
</div>
<div class="section"><h3>Building the Visual Studio Add-in with Visual Studio / MSBuild</h3>
<p>If you just wish to work on the Visual Studio Add-in, it can be loaded into Visual Studio and built there. More information is available in <a href="./debugging-addin.html"> Debugging the Visual Studio Add-in</a>.</p>
</div>
<div class="section"><h3>Running Integration Tests</h3>
<p>The Maven command line plugins feature a series of integration tests to ensure that everything is working as expected. They can be obtained by checking out the source code at <a class="externalLink" href="https://npanday.svn.codeplex.com/svn/npanday-its/trunk">https://npanday.svn.codeplex.com/svn/npanday-its/trunk</a>.</p>
<p>For example:</p>
<div class="source"><pre>svn co https://npanday.svn.codeplex.com/svn/npanday-its/trunk npanday-its</pre>
</div>
<p>From within that directory, you can run it against the latest available version of NPanday (likely the one you have just built above) using the following command:</p>
<div class="source"><pre>mvn test -Prun-its</pre>
</div>
<p>The command will indicate which version of NPanday is being used, and which tests pass and fail. It will also indicate which version of .NET SDK is installed and used by the tests - for example, if .NET 3.5 SDK is not available, tests that depend on it will be skipped.</p>
<p>You can also run them against a specific previous version of NPanday (which will be downloaded from the repository if needed):</p>
<div class="source"><pre>mvn test -Prun-its -Dnpanday.version=1.2</pre>
</div>
<p>When contributing fixes for issues in the Maven plugins, it is appropriate to write an integration test along with it. They are written in Java, using JUnit, and contain a sample project against which <tt>mvn</tt> is run against, and the the expected results are then verified. Existing integration tests can be used as a guide.</p>
</div>
<div class="section"><h3>Cleaning the Environment</h3>
<p>It is common under the current architecture of NPanday to get clashes between versions, so if you are developing on a different version to the one previously run, you may wish to clean up your environment beforehand. The full steps to do so can be found in the <a href="../guide/installation/uninstall.html"> Uninstalling NPanday</a> guide. You will need to rebuild NPanday with the steps above afterwards.</p>
<p><i>Note:</i> Not all steps are always required. The most common source of problems is the <tt>uac</tt> directory, and in particular the <tt>rdfRepository</tt> subdirectory, and the <tt>npanday.artifacts.resolved</tt> file. These can be safely deleted at any time without affecting the system as they will be regenerated. </p>
</div>
</div>

      </div>
    </div>
    <div class="clear">
      <hr/>
    </div>
    <div id="footer">
      <div class="xright">&#169;  
          2010
    
          NPanday
          
  

  
    
            
  
    
  </div>
      <div class="clear">
        <hr/>
      </div>
    </div>
  </body>
</html>
